home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / bin / bashbug < prev    next >
Text File  |  1995-07-02  |  2KB  |  82 lines

  1. #!/bin/sh -
  2. #
  3. # bashbug - create a bug report and mail it to bug-bash@prep.ai.mit.edu
  4. #
  5. # configuration section:
  6. #    these variables are filled in by the make target in cpp-Makefile
  7. #
  8. MACHINE="i386"
  9. OS="SCO"
  10. CC="cc"
  11. CFLAGS="  -DHAVE_VFPRINTF -DHAVE_UNISTD_H -DHAVE_STDLIB_H -DHAVE_LIMITS_H  -DHAVE_GETGROUPS  -DHAVE_SYS_PARAM -DVOID_SIGHANDLER -DUSG -DUSGr3 -DPGRP_PIPE -DNO_SBRK_DECL -DOPENDIR_NOT_ROBUST -DMUST_UNBLOCK_CHILD -DHAVE_WAIT_H  -DHAVE_GETWD -DHAVE_DUP2   -DHAVE_DIRENT_H -DHAVE_STRING_H  -DHAVE_VARARGS_H -DHAVE_STRCHR  -DHAVE_DEV_FD  -Di386 -DSCO -DSHELL -DHAVE_ALLOCA    -O"
  12. RELEASE="1.14"
  13. PATCHLEVEL="4"
  14.  
  15. PATH=/bin:/usr/bin:usr/local/bin:$PATH
  16. export PATH
  17.  
  18. TEMP=/tmp/bashbug.$$
  19.  
  20. BUGADDR=${1-bug-bash@prep.ai.mit.edu}
  21.  
  22. : ${EDITOR=emacs}
  23.  
  24. trap 'rm -f $TEMP $TEMP.x; exit 1' 1 2 3 13 15
  25. trap 'rm -f $TEMP $TEMP.x' 0
  26.  
  27. UN=
  28. if (uname) >/dev/null 2>&1; then
  29.     UN=`uname -a`
  30. fi
  31.  
  32. if [ -f /usr/lib/sendmail ] ; then
  33.     RMAIL="/usr/lib/sendmail"
  34. elif [ -f /usr/sbin/sendmail ] ; then
  35.     RMAIL="/usr/sbin/sendmail"
  36. else
  37.     RMAIL=rmail
  38. fi
  39.  
  40. cat > $TEMP <<EOF
  41. From: ${USER}
  42. To: ${BUGADDR}
  43. Subject: [50 character or so descriptive subject here (for reference)]
  44.  
  45. Configuration Information [Automatically generated, do not change]:
  46. Machine: $MACHINE
  47. OS: $OS
  48. Compiler: $CC
  49. Compilation CFLAGS: $CFLAGS
  50. uname output: $UN
  51.  
  52. Bash Version: $RELEASE
  53. Patch Level: $PATCHLEVEL
  54.  
  55. Description:
  56.         [Detailed description of the problem, suggestion, or complaint.]
  57.  
  58. Repeat-By:
  59.         [Describe the sequence of events that causes the problem
  60.         to occur.]
  61.  
  62. Fix:
  63.         [Description of how to fix the problem.  If you don't know a
  64.         fix for the problem, don't include this section.]
  65. EOF
  66.  
  67. chmod u+w $TEMP
  68. cp $TEMP $TEMP.x
  69.  
  70. if $EDITOR $TEMP
  71. then
  72.     if cmp -s $TEMP $TEMP.x
  73.     then
  74.         echo "File not changed, no bug report submitted."
  75.         exit
  76.     fi
  77.  
  78.     ${RMAIL} $BUGADDR < $TEMP || cat $TEMP >> $HOME/dead.bashbug
  79. fi
  80.  
  81. exit 0
  82.